class EmailsController < ApplicationController
  require 'net/smtp'
  def new
    @email = Email.new
  end

  def create
    mail(to: params[:email][:to], subject: 'Welcome to My Awesome Site').deliver
    redirect_to action: 'new', notice: 'Successful!'
  end
end
